import { Tabs, TabsProps } from "antd";
import { TAB_VALUES } from "./constant";
import styles from "./index.module.less";
import { useState } from "react";
import Banner from "./Banner";
import Banner2 from "./Banner2";

export default () => {
	const [activeKey, setActiveKey] = useState(TAB_VALUES.banner);

	const items: TabsProps["items"] = [
		{
			key: TAB_VALUES.banner,
			label: "BANNER",
			children: <Banner />
		},
		{
			key: TAB_VALUES.entrance,
			label: "中部运营位",
			children: <Banner2 />
		}
	];

	return (
		<div className={styles.container}>
			<div className={styles.title}>课程首页</div>
			<Tabs className={styles.tab} activeKey={activeKey} items={items} onChange={t => setActiveKey(t)} />
		</div>
	);
};
